class Article < ActiveRecord::Base
  #belongs_to :category
  has_many :comments
  has_many :upload_files
  has_many :articles_categories,:class_name => "ArticlesCategories"
  has_many :categories,:through => :articles_categories,:source => :category
  has_many   :subscribe_users,:through => :subscribes,:source => :user

	def to_param
		permalink
	end

end
